package com.wodsy.phoenix.dataobject.payc.model;

import java.util.Date;
import javax.persistence.*;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;
import org.hibernate.annotations.GenericGenerator;

/**
 * TbTradeQuotation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_trade_quotation", catalog = "payc")
public class TradeQuotation extends PhoenixObject implements
		java.io.Serializable {

	// Fields

	private Long id;
	private Integer money;
	private TradeSource source;
	private Date createTime;

	// Constructors

	/** default constructor */
	public TradeQuotation() {
	}

	/** full constructor */
	public TradeQuotation(Integer money, TradeSource source, Date createTime) {
		this.money = money;
		this.source = source;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "money", nullable = false)
	public Integer getMoney() {
		return this.money;
	}

	public void setMoney(Integer money) {
		this.money = money;
	}

	@Column(name = "source", nullable = false)
    @Enumerated(EnumType.ORDINAL)
	public TradeSource getSource() {
		return this.source;
	}

	public void setSource(TradeSource source) {
		this.source = source;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

    /**
     * 支付请求的来源
     */
    public static enum TradeSource {
        /**
         * 0:web商城
         */
        WEB,
        /**
         * 1:h5商城
         */
        H5,
        /**
         * 2:微信
         */
        WEIXIN;

    }
}